﻿using System;
using System.Diagnostics;

namespace BingDesktopChanger
{
    internal class Helper
    {
        public const string LOG_SOURCE = "Bing Image Retriever";

        internal static string DateToDbFormat(DateTime target)
        {
            return target.ToString("yyyy-MM-dd");
        }

        internal static void LogException(Exception ex)
        {
            EventLog log = new EventLog();
            log.Source = Helper.LOG_SOURCE;
            log.WriteEntry(ex.Message, EventLogEntryType.Error);
        }
    }
}
